package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author 李琦
 * @since 2021-12-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("tree_tab")
public class TreeTab implements Serializable {


    @TableId(value = "cid", type = IdType.AUTO)
    private Integer cid;

    private String cname;

    private Integer pid;

    @TableField(exist = false)
    private List<TreeTab> node = new ArrayList<>();

    @Override
    public String toString() {
        return "TreeTab{" +
                "cid=" + cid +
                ", cname='" + cname + '\'' +
                ", pid=" + pid +
                '}';
    }
}
